﻿Imports System
Imports System.Collections

Public Class ListasBE
#Region "Campos y Propiedades"
    Private _IdLista As Integer
    Private _Nombre As String
    Private _Contenido As String
    Private _ListaInterna As Boolean
    Private _ListaPadre As Integer
    Private _SqlSelect As String
    Private _CodigoInterno As String
    Private _CampoMostrar As String
    Private _CampoRelacionPadre As String
    Private _Estado As String
    Private _IdDatoExterno As Integer

    Public Property IdLista() As Integer
        Get
            Return _IdLista
        End Get
        Set(ByVal value As Integer)
            _IdLista = value
        End Set
    End Property

    Public Property Nombre() As String
        Get
            Return _Nombre
        End Get
        Set(ByVal value As String)
            _Nombre = value
        End Set
    End Property

    Public Property Contenido() As String
        Get
            Return _Contenido
        End Get
        Set(ByVal value As String)
            _Contenido = value
        End Set
    End Property

    Public Property ListaInterna() As Boolean
        Get
            Return _ListaInterna
        End Get
        Set(ByVal value As Boolean)
            _ListaInterna = value
        End Set
    End Property

    Public Property ListaPadre() As Integer
        Get
            Return _ListaPadre
        End Get
        Set(ByVal value As Integer)
            _ListaPadre = value
        End Set
    End Property

    Public Property SqlSelect() As String
        Get
            Return _SqlSelect
        End Get
        Set(ByVal value As String)
            _SqlSelect = value
        End Set
    End Property

    Public Property CodigoInterno() As String
        Get
            Return _CodigoInterno
        End Get
        Set(ByVal value As String)
            _CodigoInterno = value
        End Set
    End Property

    Public Property CampoMostrar() As String
        Get
            Return _CampoMostrar
        End Get
        Set(ByVal value As String)
            _CampoMostrar = value
        End Set
    End Property

    Public Property CampoRelacionPadre() As String
        Get
            Return _CampoRelacionPadre
        End Get
        Set(ByVal value As String)
            _CampoRelacionPadre = value
        End Set
    End Property

    Public Property Estado() As String
        Get
            Return _Estado
        End Get
        Set(ByVal value As String)
            _Estado = value
        End Set
    End Property

    Public Property IdDatoExterno() As Integer
        Get
            Return _IdDatoExterno
        End Get
        Set(ByVal value As Integer)
            _IdDatoExterno = value
        End Set
    End Property

#End Region

#Region "Constructores"

    Public Sub New()

    End Sub

    Public Sub New(ByVal IdLista As Integer, ByVal Nombre As String, ByVal Contenido As String, ByVal ListaInterna As Boolean, ByVal ListaPadre As Integer, ByVal SqlSelect As String, ByVal CodigoInterno As String, ByVal CampoMostrar As String, ByVal CampoRelacionPadre As String, ByVal Estado As String)
        Me._IdLista = IdLista
        Me._Nombre = Nombre
        Me._Contenido = Contenido
        Me._ListaInterna = ListaInterna
        Me._ListaPadre = ListaPadre
        Me._SqlSelect = SqlSelect
        Me._CodigoInterno = CodigoInterno
        Me._CampoMostrar = CampoMostrar
        Me._CampoRelacionPadre = CampoRelacionPadre
        Me._Estado = Estado
    End Sub
#End Region
End Class

Public Class ListasBECollection
    Inherits CollectionBase

    Default Public Property Item(ByVal index As Integer) As ListasBE
        Get
            Return CType(List(index), ListasBE)
        End Get
        Set(ByVal value As ListasBE)
            List(index) = value
        End Set
    End Property

    Public Function Add(ByVal value As ListasBE) As Integer
        Return (List.Add(value))
    End Function

    Public Function IndexOf(ByVal value As ListasBE) As Integer
        Return (List.IndexOf(value))
    End Function

    Public Sub Insert(ByVal index As Integer, ByVal value As ListasBE)
        List.Insert(index, value)
    End Sub

    Public Sub Remove(ByVal value As ListasBE)
        List.Remove(value)
    End Sub

    Public Function Contains(ByVal value As ListasBE) As Boolean
        Return (List.Contains(value))
    End Function
End Class



